package com.dongjiantong.biz.serviceImpl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongjiantong.biz.mapper.EarMarkLifeMapper;
import com.dongjiantong.biz.model.EarMarkLife;
import com.dongjiantong.biz.service.EarMarkLifeWriteService;
import com.dongjiantong.mybatis.ServiceMybatis;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by ThinkPad on 2017/11/14.
 */
@Slf4j
@Service(version = "1.0.0")

public class EarMarkLifeWriteServiceImpl extends ServiceMybatis<EarMarkLife> implements EarMarkLifeWriteService {
    @Resource
    private EarMarkLifeMapper earMarkLifeMapper;


    /**
     * 通过单据id查询
     *
     * @param paramMapOfEarLifeQuery
     * @return
     */
    @Override
    public List<String> findListByBreedReportId(Map<String, Object> paramMapOfEarLifeQuery) {
        return earMarkLifeMapper.findListByBreedReportId(paramMapOfEarLifeQuery);
    }

    /**
     * 通过关联单据id和type删除单据
     *
     * @param paramMapOfEarLifeQuery
     */
    @Override
    public void deleteByReportIdAndType(Map<String, Object> paramMapOfEarLifeQuery) {
        earMarkLifeMapper.deleteByReportIdAndType(paramMapOfEarLifeQuery);
    }

    @Override
    public void updateMarks(Map<String, Object> map) {
        earMarkLifeMapper.updateMarks(map);
    }
}
